package com.bwie.auth.remote.impl;

import com.bwie.auth.remote.AuthRemote;
import com.bwie.common.domain.Admin;
import com.bwie.common.result.Result;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

public class Fusing implements FallbackFactory<AuthRemote> {
    @Override
    public AuthRemote create(Throwable cause) {
        return new AuthRemote() {
            @Override
            public Result<Admin> findByAdminPhone(String adminPhone) {
                return Result.error("服务器繁忙...");
            }
        };
    }
}
